package miao.demo;

import miao.demo.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/*
    目标：IOC和DI快速入门
 */
public class APP2 {

    public static void main(String[] args) {
        //3.获取容器
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");

        //4.获取bean
        BookService bookService = (BookService) ctx.getBean("bookService");
        bookService.save();
    }
}
